{% extends "pretixcontrol/events/create_base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load static %}
{% block form %}
    <fieldset>
        <legend>{% trans "General information" %}</legend>
        {% bootstrap_field form.name layout="control" %}
        <div class="form-group">
            <label class="col-md-3 control-label" for="{{ form.slug.id_for_label }}">{{ form.slug.label }}</label>
            <div class="col-md-9 form-inline">
                <button class="btn btn-default pull-right flip" type="button" id="event-slug-random-generate"
                        data-rng-url="{% url "control:events.add.slugrng" organizer=organizer.slug %}">
                    {% trans "Set to random" %}
                </button>
                {% bootstrap_field form.slug form_group_class="helper-display-inline" show_label=False layout="inline" %}
                <div class="help-block">
                    {% blocktrans trimmed %}
                        This is the address users can buy your tickets at. Should be short, only contain lowercase
                        letters and numbers, and must be unique among your events. We recommend some kind of
                        abbreviation or a date with less than 10 characters that can be easily remembered, but you
                        can also choose to use a random value.
                    {% endblocktrans %}
                </div>
                <div class="help-block">
                    {% blocktrans trimmed %}
                        We will also use this in some places like order codes, invoice numbers or bank transfer
                        references as an abbreviation to reference this event.
                    {% endblocktrans %}
                </div>
                <div class="slug-length alert alert-warning helper-display-none-soft">
                    {% blocktrans trimmed %}
                        We strongly recommend against using short forms of more then 16 characters.
                    {% endblocktrans %}
                </div>
            </div>
        </div>
        {% bootstrap_field form.date_from layout="control" %}
        {% if form.date_to %}
            {% bootstrap_field form.date_to layout="control" %}
        {% endif %}
        {% include "pretixcontrol/event/fragment_geodata.html" %}
        {% bootstrap_field form.currency layout="control" %}
        {% bootstrap_field form.tax_rate addon_after="%" layout="control" %}
    </fieldset>
    <fieldset>
        <legend>{% trans "Display settings" %}</legend>
        {% bootstrap_field form.locale layout="control" %}
        {% bootstrap_field form.timezone layout="control" %}
    </fieldset>
    {% if form.presale_start %}
        <fieldset>
            <legend>{% trans "Timeline" %}</legend>
            {% bootstrap_field form.presale_start layout="control" %}
            {% bootstrap_field form.presale_end layout="control" %}
        </fieldset>
    {% endif %}

    {% if form.team %}
        <fieldset>
            <legend>{% trans "Team" %}</legend>
            {%  bootstrap_field form.team layout="control" %}
        </fieldset>
    {% endif %}
{% endblock %}
